3.7.85 \(\int \frac {\cos ^5(c+d x) \cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx\) [685]

Optimal. Leaf size=95 \[ -\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d}-\frac {2 \sin (c+d x)}{a d}+\frac {\sin ^2(c+d x)}{a d}+\frac {\sin ^3(c+d x)}{3 a d}-\frac {\sin ^4(c+d x)}{4 a d} \]

[Out]

-csc(d*x+c)/a/d-ln(sin(d*x+c))/a/d-2*sin(d*x+c)/a/d+sin(d*x+c)^2/a/d+1/3*sin(d*x+c)^3/a/d-1/4*sin(d*x+c)^4/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2915, 12, 90} \begin {gather*} -\frac {\sin ^4(c+d x)}{4 a d}+\frac {\sin ^3(c+d x)}{3 a d}+\frac {\sin ^2(c+d x)}{a d}-\frac {2 \sin (c+d x)}{a d}-\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^5*Cot[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

-(Csc[c + d*x]/(a*d)) - Log[Sin[c + d*x]]/(a*d) - (2*Sin[c + d*x])/(a*d) + Sin[c + d*x]^2/(a*d) + Sin[c + d*x]
^3/(3*a*d) - Sin[c + d*x]^4/(4*a*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \frac {\cos ^5(c+d x) \cot ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {a^2 (a-x)^3 (a+x)^2}{x^2} \, dx,x,a \sin (c+d x)\right )}{a^7 d}\\ &=\frac {\text {Subst}\left (\int \frac {(a-x)^3 (a+x)^2}{x^2} \, dx,x,a \sin (c+d x)\right )}{a^5 d}\\ &=\frac {\text {Subst}\left (\int \left (-2 a^3+\frac {a^5}{x^2}-\frac {a^4}{x}+2 a^2 x+a x^2-x^3\right ) \, dx,x,a \sin (c+d x)\right )}{a^5 d}\\ &=-\frac {\csc (c+d x)}{a d}-\frac {\log (\sin (c+d x))}{a d}-\frac {2 \sin (c+d x)}{a d}+\frac {\sin ^2(c+d x)}{a d}+\frac {\sin ^3(c+d x)}{3 a d}-\frac {\sin ^4(c+d x)}{4 a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 66, normalized size = 0.69 \begin {gather*} -\frac {12 \csc (c+d x)+12 \log (\sin (c+d x))+24 \sin (c+d x)-12 \sin ^2(c+d x)-4 \sin ^3(c+d x)+3 \sin ^4(c+d x)}{12 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^5*Cot[c + d*x]^2)/(a + a*Sin[c + d*x]),x]

[Out]

-1/12*(12*Csc[c + d*x] + 12*Log[Sin[c + d*x]] + 24*Sin[c + d*x] - 12*Sin[c + d*x]^2 - 4*Sin[c + d*x]^3 + 3*Sin
[c + d*x]^4)/(a*d)

________________________________________________________________________________________

Maple [A]
time = 0.25, size = 64, normalized size = 0.67

method result size
derivativedivides \(\frac {-\ln \left (\sin \left (d x +c \right )\right )-\frac {1}{\sin \left (d x +c \right )}-\frac {\left (\sin ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{3}+\sin ^{2}\left (d x +c \right )-2 \sin \left (d x +c \right )}{d a}\) \(64\)
default \(\frac {-\ln \left (\sin \left (d x +c \right )\right )-\frac {1}{\sin \left (d x +c \right )}-\frac {\left (\sin ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\sin ^{3}\left (d x +c \right )\right )}{3}+\sin ^{2}\left (d x +c \right )-2 \sin \left (d x +c \right )}{d a}\) \(64\)
risch \(\frac {i x}{a}-\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )}}{16 a d}+\frac {7 i {\mathrm e}^{i \left (d x +c \right )}}{8 a d}-\frac {7 i {\mathrm e}^{-i \left (d x +c \right )}}{8 a d}-\frac {3 \,{\mathrm e}^{-2 i \left (d x +c \right )}}{16 a d}+\frac {2 i c}{a d}-\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a d}-\frac {\cos \left (4 d x +4 c \right )}{32 a d}-\frac {\sin \left (3 d x +3 c \right )}{12 a d}\) \(174\)
norman \(\frac {-\frac {1}{2 a d}-\frac {\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}-\frac {13 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}-\frac {13 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}-\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {43 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {43 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {47 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {47 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {47 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {47 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5} \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) \(299\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^7*csc(d*x+c)^2/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(-ln(sin(d*x+c))-1/sin(d*x+c)-1/4*sin(d*x+c)^4+1/3*sin(d*x+c)^3+sin(d*x+c)^2-2*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 74, normalized size = 0.78 \begin {gather*} -\frac {\frac {3 \, \sin \left (d x + c\right )^{4} - 4 \, \sin \left (d x + c\right )^{3} - 12 \, \sin \left (d x + c\right )^{2} + 24 \, \sin \left (d x + c\right )}{a} + \frac {12 \, \log \left (\sin \left (d x + c\right )\right )}{a} + \frac {12}{a \sin \left (d x + c\right )}}{12 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^7*csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/12*((3*sin(d*x + c)^4 - 4*sin(d*x + c)^3 - 12*sin(d*x + c)^2 + 24*sin(d*x + c))/a + 12*log(sin(d*x + c))/a
+ 12/(a*sin(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 85, normalized size = 0.89 \begin {gather*} \frac {32 \, \cos \left (d x + c\right )^{4} + 128 \, \cos \left (d x + c\right )^{2} - 3 \, {\left (8 \, \cos \left (d x + c\right )^{4} + 16 \, \cos \left (d x + c\right )^{2} - 11\right )} \sin \left (d x + c\right ) - 96 \, \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) - 256}{96 \, a d \sin \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^7*csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/96*(32*cos(d*x + c)^4 + 128*cos(d*x + c)^2 - 3*(8*cos(d*x + c)^4 + 16*cos(d*x + c)^2 - 11)*sin(d*x + c) - 96
*log(1/2*sin(d*x + c))*sin(d*x + c) - 256)/(a*d*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**7*csc(d*x+c)**2/(a+a*sin(d*x+c)),x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 3004 deep

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 95, normalized size = 1.00 \begin {gather*} -\frac {\frac {12 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a} - \frac {12 \, {\left (\sin \left (d x + c\right ) - 1\right )}}{a \sin \left (d x + c\right )} + \frac {3 \, a^{3} \sin \left (d x + c\right )^{4} - 4 \, a^{3} \sin \left (d x + c\right )^{3} - 12 \, a^{3} \sin \left (d x + c\right )^{2} + 24 \, a^{3} \sin \left (d x + c\right )}{a^{4}}}{12 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^7*csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/12*(12*log(abs(sin(d*x + c)))/a - 12*(sin(d*x + c) - 1)/(a*sin(d*x + c)) + (3*a^3*sin(d*x + c)^4 - 4*a^3*si
n(d*x + c)^3 - 12*a^3*sin(d*x + c)^2 + 24*a^3*sin(d*x + c))/a^4)/d

________________________________________________________________________________________

Mupad [B]
time = 9.36, size = 272, normalized size = 2.86 \begin {gather*} \frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a\,d}-\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{a\,d}+\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{a\,d}-\frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{a\,d}+\frac {\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{a\,d}-\frac {\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a\,d}+\frac {20\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3\,a\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3\,a\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{3\,a\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {9\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^7/(sin(c + d*x)^2*(a + a*sin(c + d*x))),x)

[Out]

(4*cos(c/2 + (d*x)/2)^2)/(a*d) - (8*cos(c/2 + (d*x)/2)^4)/(a*d) + (8*cos(c/2 + (d*x)/2)^6)/(a*d) - (4*cos(c/2
+ (d*x)/2)^8)/(a*d) + log(1/cos(c/2 + (d*x)/2)^2)/(a*d) - log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2))/(a*d) + (
20*cos(c/2 + (d*x)/2)^3)/(3*a*d*sin(c/2 + (d*x)/2)) - (16*cos(c/2 + (d*x)/2)^5)/(3*a*d*sin(c/2 + (d*x)/2)) + (
8*cos(c/2 + (d*x)/2)^7)/(3*a*d*sin(c/2 + (d*x)/2)) - (9*cos(c/2 + (d*x)/2))/(2*a*d*sin(c/2 + (d*x)/2)) - sin(c
/2 + (d*x)/2)/(2*a*d*cos(c/2 + (d*x)/2))

________________________________________________________________________________________